cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project("Mapbox GL Native" LANGUAGES CXX C)

# TODO: Remove when PROJECT_SOURCE_DIR becomes the actual root.
set(MBGL_ROOT ${PROJECT_SOURCE_DIR}/..)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER Core)

set(
    MEMORYCHECK_COMMAND_OPTIONS
    "--leak-check=full --gen-suppressions=all --error-exitcode=1 --suppressions=${MBGL_ROOT}/scripts/valgrind.sup"
)

include(CTest)

if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Release)
endif()

option(MBGL_WITH_CORE_ONLY "Build only the core bits, no platform code" OFF)
option(MBGL_WITH_COVERAGE "Enable code coverage collection" OFF)
option(MBGL_WITH_QT "Build Mapbox GL Qt bindings" OFF)
option(MBGL_WITH_SANITIZER "Use [address|thread|undefined] here" OFF)

add_library(
    mbgl-compiler-options INTERFACE
)

target_compile_options(
    mbgl-compiler-options
    INTERFACE
        $<$<BOOL:${MBGL_WITH_COVERAGE}>:--coverage>
        $<$<BOOL:${MBGL_WITH_SANITIZER}>:-DSANITIZE>
        $<$<BOOL:${MBGL_WITH_SANITIZER}>:-fno-omit-frame-pointer>
        $<$<BOOL:${MBGL_WITH_SANITIZER}>:-fno-optimize-sibling-calls>
        $<$<STREQUAL:${MBGL_WITH_SANITIZER},address>:-fsanitize=address>
        $<$<STREQUAL:${MBGL_WITH_SANITIZER},thread>:-fsanitize=thread>
        $<$<STREQUAL:${MBGL_WITH_SANITIZER},undefined>:-fsanitize=implicit-conversion>
        $<$<STREQUAL:${MBGL_WITH_SANITIZER},undefined>:-fsanitize=undefined>
        $<$<STREQUAL:${MBGL_WITH_SANITIZER},undefined>:-fsanitize=unsigned-integer-overflow>
        $<$<COMPILE_LANGUAGE:CXX>:-fno-rtti>
        $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<PLATFORM_ID:Windows>>>:-Wall>
        $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<PLATFORM_ID:Windows>>>:-Wshadow>
        $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<PLATFORM_ID:Windows>>>:-Wextra>
        $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<PLATFORM_ID:Windows>>>:-Werror>
        $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<PLATFORM_ID:Android>>:-Wno-error=tautological-constant-compare>
        $<$<CXX_COMPILER_ID:GNU>:-Wno-error=maybe-uninitialized>
        $<$<CXX_COMPILER_ID:GNU>:-Wno-error=return-type>
        $<$<CXX_COMPILER_ID:GNU>:-Wno-error=unknown-pragmas>
        $<$<CXX_COMPILER_ID:AppleClang>:-Wno-error=deprecated-declarations>
        $<$<CXX_COMPILER_ID:AppleClang>:-Wno-error=unused-parameter>
        $<$<CXX_COMPILER_ID:AppleClang>:-Wno-error=unused-property-ivar>
)

target_link_libraries(
    mbgl-compiler-options
    INTERFACE
        $<$<BOOL:${MBGL_WITH_COVERAGE}>:--coverage>
        $<$<STREQUAL:${MBGL_WITH_SANITIZER},address>:-fsanitize=address>
        $<$<STREQUAL:${MBGL_WITH_SANITIZER},thread>:-fsanitize=thread>
        $<$<STREQUAL:${MBGL_WITH_SANITIZER},undefined>:-fsanitize=undefined>
)

cmake_policy(SET CMP0063 NEW)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_MINSIZEREL ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)

if(MBGL_WITH_QT)
    find_package(Qt5Core REQUIRED)
    set(CMAKE_AUTOMOC ON)
    set(CMAKE_AUTORCC ON)
endif()

add_library(
    mbgl-core STATIC
    ${MBGL_ROOT}/include/mbgl/actor/actor.hpp
    ${MBGL_ROOT}/include/mbgl/actor/actor_ref.hpp
    ${MBGL_ROOT}/include/mbgl/actor/aspiring_actor.hpp
    ${MBGL_ROOT}/include/mbgl/actor/established_actor.hpp
    ${MBGL_ROOT}/include/mbgl/actor/mailbox.hpp
    ${MBGL_ROOT}/include/mbgl/actor/message.hpp
    ${MBGL_ROOT}/include/mbgl/actor/scheduler.hpp
    ${MBGL_ROOT}/include/mbgl/annotation/annotation.hpp
    ${MBGL_ROOT}/include/mbgl/gfx/backend.hpp
    ${MBGL_ROOT}/include/mbgl/gfx/backend_scope.hpp
    ${MBGL_ROOT}/include/mbgl/gfx/renderable.hpp
    ${MBGL_ROOT}/include/mbgl/gfx/renderer_backend.hpp
    ${MBGL_ROOT}/include/mbgl/gfx/rendering_stats.hpp
    ${MBGL_ROOT}/include/mbgl/gl/renderable_resource.hpp
    ${MBGL_ROOT}/include/mbgl/gl/renderer_backend.hpp
    ${MBGL_ROOT}/include/mbgl/layermanager/background_layer_factory.hpp
    ${MBGL_ROOT}/include/mbgl/layermanager/circle_layer_factory.hpp
    ${MBGL_ROOT}/include/mbgl/layermanager/custom_layer_factory.hpp
    ${MBGL_ROOT}/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp
    ${MBGL_ROOT}/include/mbgl/layermanager/fill_layer_factory.hpp
    ${MBGL_ROOT}/include/mbgl/layermanager/heatmap_layer_factory.hpp
    ${MBGL_ROOT}/include/mbgl/layermanager/hillshade_layer_factory.hpp
    ${MBGL_ROOT}/include/mbgl/layermanager/layer_factory.hpp
    ${MBGL_ROOT}/include/mbgl/layermanager/layer_manager.hpp
    ${MBGL_ROOT}/include/mbgl/layermanager/line_layer_factory.hpp
    ${MBGL_ROOT}/include/mbgl/layermanager/raster_layer_factory.hpp
    ${MBGL_ROOT}/include/mbgl/layermanager/symbol_layer_factory.hpp
    ${MBGL_ROOT}/include/mbgl/map/bound_options.hpp
    ${MBGL_ROOT}/include/mbgl/map/camera.hpp
    ${MBGL_ROOT}/include/mbgl/map/change.hpp
    ${MBGL_ROOT}/include/mbgl/map/map.hpp
    ${MBGL_ROOT}/include/mbgl/map/map_observer.hpp
    ${MBGL_ROOT}/include/mbgl/map/map_options.hpp
    ${MBGL_ROOT}/include/mbgl/map/mode.hpp
    ${MBGL_ROOT}/include/mbgl/map/projection_mode.hpp
    ${MBGL_ROOT}/include/mbgl/math/clamp.hpp
    ${MBGL_ROOT}/include/mbgl/math/log2.hpp
    ${MBGL_ROOT}/include/mbgl/math/minmax.hpp
    ${MBGL_ROOT}/include/mbgl/math/wrap.hpp
    ${MBGL_ROOT}/include/mbgl/platform/gl_functions.hpp
    ${MBGL_ROOT}/include/mbgl/platform/thread.hpp
    ${MBGL_ROOT}/include/mbgl/renderer/query.hpp
    ${MBGL_ROOT}/include/mbgl/renderer/renderer.hpp
    ${MBGL_ROOT}/include/mbgl/renderer/renderer_frontend.hpp
    ${MBGL_ROOT}/include/mbgl/renderer/renderer_observer.hpp
    ${MBGL_ROOT}/include/mbgl/renderer/renderer_state.hpp
    ${MBGL_ROOT}/include/mbgl/storage/default_file_source.hpp
    ${MBGL_ROOT}/include/mbgl/storage/file_source.hpp
    ${MBGL_ROOT}/include/mbgl/storage/network_status.hpp
    ${MBGL_ROOT}/include/mbgl/storage/offline.hpp
    ${MBGL_ROOT}/include/mbgl/storage/online_file_source.hpp
    ${MBGL_ROOT}/include/mbgl/storage/resource.hpp
    ${MBGL_ROOT}/include/mbgl/storage/resource_options.hpp
    ${MBGL_ROOT}/include/mbgl/storage/resource_transform.hpp
    ${MBGL_ROOT}/include/mbgl/storage/response.hpp
    ${MBGL_ROOT}/include/mbgl/style/color_ramp_property_value.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/color_ramp_property_value.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/constant.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/coordinate.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/custom_geometry_source_options.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/filter.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/function.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/geojson.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/geojson_options.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/get_json_type.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/layer.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/light.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/position.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/property_value.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/source.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/tileset.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion/transition_options.hpp
    ${MBGL_ROOT}/include/mbgl/style/conversion_impl.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/assertion.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/at.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/boolean_operator.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/case.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/check_subtype.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/coalesce.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/coercion.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/collator.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/collator_expression.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/comparison.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/compound_expression.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/dsl.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/error.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/expression.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/find_zoom_curve.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/format_expression.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/format_section_override.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/formatted.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/get_covering_stops.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/image.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/image_expression.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/interpolate.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/interpolator.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/is_constant.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/is_expression.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/length.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/let.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/literal.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/match.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/number_format.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/parsing_context.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/step.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/type.hpp
    ${MBGL_ROOT}/include/mbgl/style/expression/value.hpp
    ${MBGL_ROOT}/include/mbgl/style/filter.hpp
    ${MBGL_ROOT}/include/mbgl/style/image.hpp
    ${MBGL_ROOT}/include/mbgl/style/layer.hpp
    ${MBGL_ROOT}/include/mbgl/style/layer_properties.hpp
    ${MBGL_ROOT}/include/mbgl/style/layers/background_layer.hpp
    ${MBGL_ROOT}/include/mbgl/style/layers/circle_layer.hpp
    ${MBGL_ROOT}/include/mbgl/style/layers/custom_layer.hpp
    ${MBGL_ROOT}/include/mbgl/style/layers/fill_extrusion_layer.hpp
    ${MBGL_ROOT}/include/mbgl/style/layers/fill_layer.hpp
    ${MBGL_ROOT}/include/mbgl/style/layers/heatmap_layer.hpp
    ${MBGL_ROOT}/include/mbgl/style/layers/hillshade_layer.hpp
    ${MBGL_ROOT}/include/mbgl/style/layers/line_layer.hpp
    ${MBGL_ROOT}/include/mbgl/style/layers/raster_layer.hpp
    ${MBGL_ROOT}/include/mbgl/style/layers/symbol_layer.hpp
    ${MBGL_ROOT}/include/mbgl/style/light.hpp
    ${MBGL_ROOT}/include/mbgl/style/position.hpp
    ${MBGL_ROOT}/include/mbgl/style/property_expression.hpp
    ${MBGL_ROOT}/include/mbgl/style/property_value.hpp
    ${MBGL_ROOT}/include/mbgl/style/source.hpp
    ${MBGL_ROOT}/include/mbgl/style/sources/custom_geometry_source.hpp
    ${MBGL_ROOT}/include/mbgl/style/sources/geojson_source.hpp
    ${MBGL_ROOT}/include/mbgl/style/sources/image_source.hpp
    ${MBGL_ROOT}/include/mbgl/style/sources/raster_dem_source.hpp
    ${MBGL_ROOT}/include/mbgl/style/sources/raster_source.hpp
    ${MBGL_ROOT}/include/mbgl/style/sources/vector_source.hpp
    ${MBGL_ROOT}/include/mbgl/style/style.hpp
    ${MBGL_ROOT}/include/mbgl/style/style_property.hpp
    ${MBGL_ROOT}/include/mbgl/style/transition_options.hpp
    ${MBGL_ROOT}/include/mbgl/style/types.hpp
    ${MBGL_ROOT}/include/mbgl/style/undefined.hpp
    ${MBGL_ROOT}/include/mbgl/tile/tile_id.hpp
    ${MBGL_ROOT}/include/mbgl/tile/tile_necessity.hpp
    ${MBGL_ROOT}/include/mbgl/util/async_request.hpp
    ${MBGL_ROOT}/include/mbgl/util/async_task.hpp
    ${MBGL_ROOT}/include/mbgl/util/char_array_buffer.hpp
    ${MBGL_ROOT}/include/mbgl/util/chrono.hpp
    ${MBGL_ROOT}/include/mbgl/util/color.hpp
    ${MBGL_ROOT}/include/mbgl/util/compression.hpp
    ${MBGL_ROOT}/include/mbgl/util/constants.hpp
    ${MBGL_ROOT}/include/mbgl/util/convert.hpp
    ${MBGL_ROOT}/include/mbgl/util/enum.hpp
    ${MBGL_ROOT}/include/mbgl/util/event.hpp
    ${MBGL_ROOT}/include/mbgl/util/exception.hpp
    ${MBGL_ROOT}/include/mbgl/util/expected.hpp
    ${MBGL_ROOT}/include/mbgl/util/feature.hpp
    ${MBGL_ROOT}/include/mbgl/util/font_stack.hpp
    ${MBGL_ROOT}/include/mbgl/util/geo.hpp
    ${MBGL_ROOT}/include/mbgl/util/geojson.hpp
    ${MBGL_ROOT}/include/mbgl/util/geometry.hpp
    ${MBGL_ROOT}/include/mbgl/util/ignore.hpp
    ${MBGL_ROOT}/include/mbgl/util/image.hpp
    ${MBGL_ROOT}/include/mbgl/util/immutable.hpp
    ${MBGL_ROOT}/include/mbgl/util/indexed_tuple.hpp
    ${MBGL_ROOT}/include/mbgl/util/interpolate.hpp
    ${MBGL_ROOT}/include/mbgl/util/logging.hpp
    ${MBGL_ROOT}/include/mbgl/util/noncopyable.hpp
    ${MBGL_ROOT}/include/mbgl/util/optional.hpp
    ${MBGL_ROOT}/include/mbgl/util/platform.hpp
    ${MBGL_ROOT}/include/mbgl/util/premultiply.hpp
    ${MBGL_ROOT}/include/mbgl/util/projection.hpp
    ${MBGL_ROOT}/include/mbgl/util/range.hpp
    ${MBGL_ROOT}/include/mbgl/util/run_loop.hpp
    ${MBGL_ROOT}/include/mbgl/util/size.hpp
    ${MBGL_ROOT}/include/mbgl/util/string.hpp
    ${MBGL_ROOT}/include/mbgl/util/thread.hpp
    ${MBGL_ROOT}/include/mbgl/util/tileset.hpp
    ${MBGL_ROOT}/include/mbgl/util/timer.hpp
    ${MBGL_ROOT}/include/mbgl/util/traits.hpp
    ${MBGL_ROOT}/include/mbgl/util/type_list.hpp
    ${MBGL_ROOT}/include/mbgl/util/unitbezier.hpp
    ${MBGL_ROOT}/include/mbgl/util/util.hpp
    ${MBGL_ROOT}/include/mbgl/util/variant.hpp
    ${MBGL_ROOT}/include/mbgl/util/work_request.hpp
    ${MBGL_ROOT}/include/mbgl/util/work_task.hpp
    ${MBGL_ROOT}/include/mbgl/util/work_task_impl.hpp
    ${MBGL_ROOT}/src/csscolorparser/csscolorparser.cpp
    ${MBGL_ROOT}/src/csscolorparser/csscolorparser.hpp
    ${MBGL_ROOT}/src/mbgl/actor/mailbox.cpp
    ${MBGL_ROOT}/src/mbgl/actor/scheduler.cpp
    ${MBGL_ROOT}/src/mbgl/algorithm/update_renderables.hpp
    ${MBGL_ROOT}/src/mbgl/algorithm/update_tile_masks.hpp
    ${MBGL_ROOT}/src/mbgl/annotation/annotation_manager.cpp
    ${MBGL_ROOT}/src/mbgl/annotation/annotation_manager.hpp
    ${MBGL_ROOT}/src/mbgl/annotation/annotation_source.cpp
    ${MBGL_ROOT}/src/mbgl/annotation/annotation_source.hpp
    ${MBGL_ROOT}/src/mbgl/annotation/annotation_tile.cpp
    ${MBGL_ROOT}/src/mbgl/annotation/annotation_tile.hpp
    ${MBGL_ROOT}/src/mbgl/annotation/fill_annotation_impl.cpp
    ${MBGL_ROOT}/src/mbgl/annotation/fill_annotation_impl.hpp
    ${MBGL_ROOT}/src/mbgl/annotation/line_annotation_impl.cpp
    ${MBGL_ROOT}/src/mbgl/annotation/line_annotation_impl.hpp
    ${MBGL_ROOT}/src/mbgl/annotation/render_annotation_source.cpp
    ${MBGL_ROOT}/src/mbgl/annotation/render_annotation_source.hpp
    ${MBGL_ROOT}/src/mbgl/annotation/shape_annotation_impl.cpp
    ${MBGL_ROOT}/src/mbgl/annotation/shape_annotation_impl.hpp
    ${MBGL_ROOT}/src/mbgl/annotation/symbol_annotation_impl.cpp
    ${MBGL_ROOT}/src/mbgl/annotation/symbol_annotation_impl.hpp
    ${MBGL_ROOT}/src/mbgl/geometry/anchor.hpp
    ${MBGL_ROOT}/src/mbgl/geometry/debug_font_data.hpp
    ${MBGL_ROOT}/src/mbgl/geometry/dem_data.cpp
    ${MBGL_ROOT}/src/mbgl/geometry/dem_data.hpp
    ${MBGL_ROOT}/src/mbgl/geometry/feature_index.cpp
    ${MBGL_ROOT}/src/mbgl/geometry/feature_index.hpp
    ${MBGL_ROOT}/src/mbgl/geometry/line_atlas.cpp
    ${MBGL_ROOT}/src/mbgl/geometry/line_atlas.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/attribute.cpp
    ${MBGL_ROOT}/src/mbgl/gfx/attribute.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/color_mode.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/command_encoder.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/context.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/cull_face_mode.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/debug_group.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/depth_mode.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/draw_mode.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/draw_scope.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/index_buffer.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/index_vector.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/offscreen_texture.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/program.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/render_pass.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/renderbuffer.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/renderer_backend.cpp
    ${MBGL_ROOT}/src/mbgl/gfx/rendering_stats.cpp
    ${MBGL_ROOT}/src/mbgl/gfx/stencil_mode.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/texture.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/types.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/uniform.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/upload_pass.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/vertex_buffer.hpp
    ${MBGL_ROOT}/src/mbgl/gfx/vertex_vector.hpp
    ${MBGL_ROOT}/src/mbgl/gl/attribute.cpp
    ${MBGL_ROOT}/src/mbgl/gl/attribute.hpp
    ${MBGL_ROOT}/src/mbgl/gl/command_encoder.cpp
    ${MBGL_ROOT}/src/mbgl/gl/command_encoder.hpp
    ${MBGL_ROOT}/src/mbgl/gl/context.cpp
    ${MBGL_ROOT}/src/mbgl/gl/context.hpp
    ${MBGL_ROOT}/src/mbgl/gl/debugging_extension.cpp
    ${MBGL_ROOT}/src/mbgl/gl/debugging_extension.hpp
    ${MBGL_ROOT}/src/mbgl/gl/defines.hpp
    ${MBGL_ROOT}/src/mbgl/gl/draw_scope_resource.hpp
    ${MBGL_ROOT}/src/mbgl/gl/enum.cpp
    ${MBGL_ROOT}/src/mbgl/gl/enum.hpp
    ${MBGL_ROOT}/src/mbgl/gl/extension.hpp
    ${MBGL_ROOT}/src/mbgl/gl/framebuffer.hpp
    ${MBGL_ROOT}/src/mbgl/gl/index_buffer_resource.cpp
    ${MBGL_ROOT}/src/mbgl/gl/index_buffer_resource.hpp
    ${MBGL_ROOT}/src/mbgl/gl/object.cpp
    ${MBGL_ROOT}/src/mbgl/gl/object.hpp
    ${MBGL_ROOT}/src/mbgl/gl/offscreen_texture.cpp
    ${MBGL_ROOT}/src/mbgl/gl/offscreen_texture.hpp
    ${MBGL_ROOT}/src/mbgl/gl/program.hpp
    ${MBGL_ROOT}/src/mbgl/gl/render_pass.cpp
    ${MBGL_ROOT}/src/mbgl/gl/render_pass.hpp
    ${MBGL_ROOT}/src/mbgl/gl/renderbuffer_resource.hpp
    ${MBGL_ROOT}/src/mbgl/gl/renderer_backend.cpp
    ${MBGL_ROOT}/src/mbgl/gl/state.hpp
    ${MBGL_ROOT}/src/mbgl/gl/texture.cpp
    ${MBGL_ROOT}/src/mbgl/gl/texture.hpp
    ${MBGL_ROOT}/src/mbgl/gl/texture_resource.cpp
    ${MBGL_ROOT}/src/mbgl/gl/texture_resource.hpp
    ${MBGL_ROOT}/src/mbgl/gl/types.hpp
    ${MBGL_ROOT}/src/mbgl/gl/uniform.cpp
    ${MBGL_ROOT}/src/mbgl/gl/uniform.hpp
    ${MBGL_ROOT}/src/mbgl/gl/upload_pass.cpp
    ${MBGL_ROOT}/src/mbgl/gl/upload_pass.hpp
    ${MBGL_ROOT}/src/mbgl/gl/value.cpp
    ${MBGL_ROOT}/src/mbgl/gl/value.hpp
    ${MBGL_ROOT}/src/mbgl/gl/vertex_array.cpp
    ${MBGL_ROOT}/src/mbgl/gl/vertex_array.hpp
    ${MBGL_ROOT}/src/mbgl/gl/vertex_array_extension.hpp
    ${MBGL_ROOT}/src/mbgl/gl/vertex_buffer_resource.cpp
    ${MBGL_ROOT}/src/mbgl/gl/vertex_buffer_resource.hpp
    ${MBGL_ROOT}/src/mbgl/layermanager/background_layer_factory.cpp
    ${MBGL_ROOT}/src/mbgl/layermanager/circle_layer_factory.cpp
    ${MBGL_ROOT}/src/mbgl/layermanager/custom_layer_factory.cpp
    ${MBGL_ROOT}/src/mbgl/layermanager/fill_extrusion_layer_factory.cpp
    ${MBGL_ROOT}/src/mbgl/layermanager/fill_layer_factory.cpp
    ${MBGL_ROOT}/src/mbgl/layermanager/heatmap_layer_factory.cpp
    ${MBGL_ROOT}/src/mbgl/layermanager/hillshade_layer_factory.cpp
    ${MBGL_ROOT}/src/mbgl/layermanager/layer_factory.cpp
    ${MBGL_ROOT}/src/mbgl/layermanager/layer_manager.cpp
    ${MBGL_ROOT}/src/mbgl/layermanager/line_layer_factory.cpp
    ${MBGL_ROOT}/src/mbgl/layermanager/raster_layer_factory.cpp
    ${MBGL_ROOT}/src/mbgl/layermanager/symbol_layer_factory.cpp
    ${MBGL_ROOT}/src/mbgl/layout/clip_lines.cpp
    ${MBGL_ROOT}/src/mbgl/layout/clip_lines.hpp
    ${MBGL_ROOT}/src/mbgl/layout/layout.hpp
    ${MBGL_ROOT}/src/mbgl/layout/merge_lines.cpp
    ${MBGL_ROOT}/src/mbgl/layout/merge_lines.hpp
    ${MBGL_ROOT}/src/mbgl/layout/pattern_layout.hpp
    ${MBGL_ROOT}/src/mbgl/layout/symbol_feature.hpp
    ${MBGL_ROOT}/src/mbgl/layout/symbol_instance.cpp
    ${MBGL_ROOT}/src/mbgl/layout/symbol_instance.hpp
    ${MBGL_ROOT}/src/mbgl/layout/symbol_layout.cpp
    ${MBGL_ROOT}/src/mbgl/layout/symbol_layout.hpp
    ${MBGL_ROOT}/src/mbgl/layout/symbol_projection.cpp
    ${MBGL_ROOT}/src/mbgl/layout/symbol_projection.hpp
    ${MBGL_ROOT}/src/mbgl/map/map.cpp
    ${MBGL_ROOT}/src/mbgl/map/map_impl.cpp
    ${MBGL_ROOT}/src/mbgl/map/map_impl.hpp
    ${MBGL_ROOT}/src/mbgl/map/map_options.cpp
    ${MBGL_ROOT}/src/mbgl/map/transform.cpp
    ${MBGL_ROOT}/src/mbgl/map/transform.hpp
    ${MBGL_ROOT}/src/mbgl/map/transform_state.cpp
    ${MBGL_ROOT}/src/mbgl/map/transform_state.hpp
    ${MBGL_ROOT}/src/mbgl/map/zoom_history.hpp
    ${MBGL_ROOT}/src/mbgl/math/log2.cpp
    ${MBGL_ROOT}/src/mbgl/platform/gl_functions.cpp
    ${MBGL_ROOT}/src/mbgl/programs/attributes.hpp
    ${MBGL_ROOT}/src/mbgl/programs/background_pattern_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/background_program.cpp
    ${MBGL_ROOT}/src/mbgl/programs/background_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/circle_program.cpp
    ${MBGL_ROOT}/src/mbgl/programs/circle_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/clipping_mask_program.cpp
    ${MBGL_ROOT}/src/mbgl/programs/clipping_mask_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/collision_box_program.cpp
    ${MBGL_ROOT}/src/mbgl/programs/collision_box_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/collision_circle_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/debug_program.cpp
    ${MBGL_ROOT}/src/mbgl/programs/debug_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/fill_extrusion_pattern_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/fill_extrusion_program.cpp
    ${MBGL_ROOT}/src/mbgl/programs/fill_extrusion_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/fill_outline_pattern_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/fill_outline_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/fill_pattern_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/fill_program.cpp
    ${MBGL_ROOT}/src/mbgl/programs/fill_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/background.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/background_pattern.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/circle.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/clipping_mask.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/collision_box.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/collision_circle.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/debug.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/fill.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/fill_extrusion.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/fill_extrusion_pattern.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/fill_outline.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/fill_outline_pattern.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/fill_pattern.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/heatmap.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/heatmap_texture.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/hillshade.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/hillshade_prepare.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/line.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/line_gradient.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/line_pattern.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/line_sdf.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/preludes.hpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/raster.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/shader_source.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/shader_source.hpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/shaders.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/shaders.hpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/symbol_icon.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/symbol_sdf_icon.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/symbol_sdf_text.cpp
    ${MBGL_ROOT}/src/mbgl/programs/gl/symbol_text_and_icon.cpp
    ${MBGL_ROOT}/src/mbgl/programs/heatmap_program.cpp
    ${MBGL_ROOT}/src/mbgl/programs/heatmap_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/heatmap_texture_program.cpp
    ${MBGL_ROOT}/src/mbgl/programs/heatmap_texture_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/hillshade_prepare_program.cpp
    ${MBGL_ROOT}/src/mbgl/programs/hillshade_prepare_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/hillshade_program.cpp
    ${MBGL_ROOT}/src/mbgl/programs/hillshade_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/line_gradient_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/line_pattern_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/line_program.cpp
    ${MBGL_ROOT}/src/mbgl/programs/line_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/line_sdf_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/program_parameters.cpp
    ${MBGL_ROOT}/src/mbgl/programs/program_parameters.hpp
    ${MBGL_ROOT}/src/mbgl/programs/programs.cpp
    ${MBGL_ROOT}/src/mbgl/programs/programs.hpp
    ${MBGL_ROOT}/src/mbgl/programs/raster_program.cpp
    ${MBGL_ROOT}/src/mbgl/programs/raster_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/segment.hpp
    ${MBGL_ROOT}/src/mbgl/programs/symbol_icon_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/symbol_program.cpp
    ${MBGL_ROOT}/src/mbgl/programs/symbol_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/symbol_sdf_icon_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/symbol_sdf_text_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/symbol_text_and_icon_program.hpp
    ${MBGL_ROOT}/src/mbgl/programs/textures.hpp
    ${MBGL_ROOT}/src/mbgl/programs/uniforms.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/backend_scope.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/bucket.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/bucket_parameters.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/bucket_parameters.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/circle_bucket.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/circle_bucket.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/debug_bucket.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/debug_bucket.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/fill_bucket.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/fill_bucket.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/heatmap_bucket.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/heatmap_bucket.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/hillshade_bucket.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/hillshade_bucket.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/line_bucket.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/line_bucket.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/raster_bucket.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/raster_bucket.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/symbol_bucket.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/buckets/symbol_bucket.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/cross_faded_property_evaluator.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/cross_faded_property_evaluator.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/data_driven_property_evaluator.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/group_by_layout.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/group_by_layout.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/image_atlas.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/image_atlas.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/image_manager.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/image_manager.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/image_manager_observer.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_background_layer.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_background_layer.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_circle_layer.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_circle_layer.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_custom_layer.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_custom_layer.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_fill_extrusion_layer.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_fill_extrusion_layer.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_fill_layer.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_fill_layer.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_heatmap_layer.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_heatmap_layer.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_hillshade_layer.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_hillshade_layer.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_line_layer.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_line_layer.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_raster_layer.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_raster_layer.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_symbol_layer.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/layers/render_symbol_layer.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/paint_parameters.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/paint_parameters.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/paint_property_binder.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/paint_property_statistics.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/pattern_atlas.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/pattern_atlas.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/possibly_evaluated_property_value.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/property_evaluation_parameters.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/property_evaluator.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_layer.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_layer.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_light.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_light.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_orchestrator.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_orchestrator.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_pass.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_source.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_source.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_source_observer.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_static_data.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_static_data.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_tile.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_tile.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/render_tree.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/renderer.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/renderer_impl.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/renderer_impl.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/renderer_state.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/sources/render_custom_geometry_source.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/sources/render_custom_geometry_source.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/sources/render_geojson_source.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/sources/render_geojson_source.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/sources/render_image_source.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/sources/render_image_source.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/sources/render_raster_dem_source.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/sources/render_raster_dem_source.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/sources/render_raster_source.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/sources/render_raster_source.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/sources/render_tile_source.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/sources/render_tile_source.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/sources/render_vector_source.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/sources/render_vector_source.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/source_state.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/source_state.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/style_diff.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/style_diff.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/tile_mask.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/tile_parameters.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/tile_pyramid.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/tile_pyramid.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/tile_render_data.cpp
    ${MBGL_ROOT}/src/mbgl/renderer/tile_render_data.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/transition_parameters.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/update_parameters.hpp
    ${MBGL_ROOT}/src/mbgl/renderer/upload_parameters.hpp
    ${MBGL_ROOT}/src/mbgl/sprite/sprite_loader.cpp
    ${MBGL_ROOT}/src/mbgl/sprite/sprite_loader.hpp
    ${MBGL_ROOT}/src/mbgl/sprite/sprite_loader_observer.hpp
    ${MBGL_ROOT}/src/mbgl/sprite/sprite_loader_worker.cpp
    ${MBGL_ROOT}/src/mbgl/sprite/sprite_loader_worker.hpp
    ${MBGL_ROOT}/src/mbgl/sprite/sprite_parser.cpp
    ${MBGL_ROOT}/src/mbgl/sprite/sprite_parser.hpp
    ${MBGL_ROOT}/src/mbgl/storage/asset_file_source.hpp
    ${MBGL_ROOT}/src/mbgl/storage/file_source.cpp
    ${MBGL_ROOT}/src/mbgl/storage/http_file_source.hpp
    ${MBGL_ROOT}/src/mbgl/storage/local_file_source.hpp
    ${MBGL_ROOT}/src/mbgl/storage/network_status.cpp
    ${MBGL_ROOT}/src/mbgl/storage/resource.cpp
    ${MBGL_ROOT}/src/mbgl/storage/resource_options.cpp
    ${MBGL_ROOT}/src/mbgl/storage/resource_transform.cpp
    ${MBGL_ROOT}/src/mbgl/storage/response.cpp
    ${MBGL_ROOT}/src/mbgl/style/collection.hpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/color_ramp_property_value.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/constant.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/coordinate.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/custom_geometry_source_options.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/filter.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/function.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/geojson.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/geojson_options.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/get_json_type.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/json.hpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/layer.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/light.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/position.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/property_value.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/source.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/stringify.hpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/tileset.cpp
    ${MBGL_ROOT}/src/mbgl/style/conversion/transition_options.cpp
    ${MBGL_ROOT}/src/mbgl/style/custom_tile_loader.cpp
    ${MBGL_ROOT}/src/mbgl/style/custom_tile_loader.hpp
    ${MBGL_ROOT}/src/mbgl/style/expression/assertion.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/at.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/boolean_operator.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/case.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/check_subtype.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/coalesce.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/coercion.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/collator.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/collator_expression.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/comparison.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/compound_expression.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/dsl.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/dsl_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/expression/expression.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/find_zoom_curve.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/format_expression.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/formatted.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/get_covering_stops.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/image.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/image_expression.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/interpolate.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/is_constant.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/is_expression.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/length.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/let.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/literal.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/match.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/number_format.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/parsing_context.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/step.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/util.cpp
    ${MBGL_ROOT}/src/mbgl/style/expression/util.hpp
    ${MBGL_ROOT}/src/mbgl/style/expression/value.cpp
    ${MBGL_ROOT}/src/mbgl/style/filter.cpp
    ${MBGL_ROOT}/src/mbgl/style/image.cpp
    ${MBGL_ROOT}/src/mbgl/style/image_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/image_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/layer.cpp
    ${MBGL_ROOT}/src/mbgl/style/layer_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/layer_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/layer_observer.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/background_layer.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/background_layer_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/background_layer_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/background_layer_properties.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/background_layer_properties.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/circle_layer.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/circle_layer_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/circle_layer_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/circle_layer_properties.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/circle_layer_properties.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/custom_layer.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/custom_layer_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/custom_layer_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/fill_extrusion_layer.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/fill_extrusion_layer_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/fill_extrusion_layer_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/fill_extrusion_layer_properties.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/fill_extrusion_layer_properties.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/fill_layer.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/fill_layer_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/fill_layer_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/fill_layer_properties.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/fill_layer_properties.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/heatmap_layer.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/heatmap_layer_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/heatmap_layer_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/heatmap_layer_properties.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/heatmap_layer_properties.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/hillshade_layer.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/hillshade_layer_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/hillshade_layer_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/hillshade_layer_properties.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/hillshade_layer_properties.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/line_layer.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/line_layer_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/line_layer_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/line_layer_properties.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/line_layer_properties.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/raster_layer.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/raster_layer_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/raster_layer_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/raster_layer_properties.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/raster_layer_properties.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/symbol_layer.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/symbol_layer_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/symbol_layer_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/layers/symbol_layer_properties.cpp
    ${MBGL_ROOT}/src/mbgl/style/layers/symbol_layer_properties.hpp
    ${MBGL_ROOT}/src/mbgl/style/layout_property.hpp
    ${MBGL_ROOT}/src/mbgl/style/light.cpp
    ${MBGL_ROOT}/src/mbgl/style/light_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/light_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/light_observer.hpp
    ${MBGL_ROOT}/src/mbgl/style/observer.hpp
    ${MBGL_ROOT}/src/mbgl/style/paint_property.hpp
    ${MBGL_ROOT}/src/mbgl/style/parser.cpp
    ${MBGL_ROOT}/src/mbgl/style/parser.hpp
    ${MBGL_ROOT}/src/mbgl/style/properties.hpp
    ${MBGL_ROOT}/src/mbgl/style/property_expression.cpp
    ${MBGL_ROOT}/src/mbgl/style/rapidjson_conversion.hpp
    ${MBGL_ROOT}/src/mbgl/style/source.cpp
    ${MBGL_ROOT}/src/mbgl/style/source_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/source_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/source_observer.hpp
    ${MBGL_ROOT}/src/mbgl/style/sources/custom_geometry_source.cpp
    ${MBGL_ROOT}/src/mbgl/style/sources/custom_geometry_source_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/sources/custom_geometry_source_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/sources/geojson_source.cpp
    ${MBGL_ROOT}/src/mbgl/style/sources/geojson_source_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/sources/geojson_source_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/sources/image_source.cpp
    ${MBGL_ROOT}/src/mbgl/style/sources/image_source_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/sources/image_source_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/sources/raster_dem_source.cpp
    ${MBGL_ROOT}/src/mbgl/style/sources/raster_source.cpp
    ${MBGL_ROOT}/src/mbgl/style/sources/raster_source_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/sources/raster_source_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/sources/vector_source.cpp
    ${MBGL_ROOT}/src/mbgl/style/sources/vector_source_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/sources/vector_source_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/style.cpp
    ${MBGL_ROOT}/src/mbgl/style/style_impl.cpp
    ${MBGL_ROOT}/src/mbgl/style/style_impl.hpp
    ${MBGL_ROOT}/src/mbgl/style/types.cpp
    ${MBGL_ROOT}/src/mbgl/text/bidi.hpp
    ${MBGL_ROOT}/src/mbgl/text/check_max_angle.cpp
    ${MBGL_ROOT}/src/mbgl/text/check_max_angle.hpp
    ${MBGL_ROOT}/src/mbgl/text/collision_feature.cpp
    ${MBGL_ROOT}/src/mbgl/text/collision_feature.hpp
    ${MBGL_ROOT}/src/mbgl/text/collision_index.cpp
    ${MBGL_ROOT}/src/mbgl/text/collision_index.hpp
    ${MBGL_ROOT}/src/mbgl/text/cross_tile_symbol_index.cpp
    ${MBGL_ROOT}/src/mbgl/text/cross_tile_symbol_index.hpp
    ${MBGL_ROOT}/src/mbgl/text/get_anchors.cpp
    ${MBGL_ROOT}/src/mbgl/text/get_anchors.hpp
    ${MBGL_ROOT}/src/mbgl/text/glyph.cpp
    ${MBGL_ROOT}/src/mbgl/text/glyph.hpp
    ${MBGL_ROOT}/src/mbgl/text/glyph_atlas.cpp
    ${MBGL_ROOT}/src/mbgl/text/glyph_atlas.hpp
    ${MBGL_ROOT}/src/mbgl/text/glyph_manager.cpp
    ${MBGL_ROOT}/src/mbgl/text/glyph_manager.hpp
    ${MBGL_ROOT}/src/mbgl/text/glyph_manager_observer.hpp
    ${MBGL_ROOT}/src/mbgl/text/glyph_pbf.cpp
    ${MBGL_ROOT}/src/mbgl/text/glyph_pbf.hpp
    ${MBGL_ROOT}/src/mbgl/text/glyph_range.hpp
    ${MBGL_ROOT}/src/mbgl/text/language_tag.cpp
    ${MBGL_ROOT}/src/mbgl/text/language_tag.hpp
    ${MBGL_ROOT}/src/mbgl/text/local_glyph_rasterizer.hpp
    ${MBGL_ROOT}/src/mbgl/text/placement.cpp
    ${MBGL_ROOT}/src/mbgl/text/placement.hpp
    ${MBGL_ROOT}/src/mbgl/text/quads.cpp
    ${MBGL_ROOT}/src/mbgl/text/quads.hpp
    ${MBGL_ROOT}/src/mbgl/text/shaping.cpp
    ${MBGL_ROOT}/src/mbgl/text/shaping.hpp
    ${MBGL_ROOT}/src/mbgl/text/tagged_string.cpp
    ${MBGL_ROOT}/src/mbgl/text/tagged_string.hpp
    ${MBGL_ROOT}/src/mbgl/tile/custom_geometry_tile.cpp
    ${MBGL_ROOT}/src/mbgl/tile/custom_geometry_tile.hpp
    ${MBGL_ROOT}/src/mbgl/tile/geojson_tile.cpp
    ${MBGL_ROOT}/src/mbgl/tile/geojson_tile.hpp
    ${MBGL_ROOT}/src/mbgl/tile/geojson_tile_data.hpp
    ${MBGL_ROOT}/src/mbgl/tile/geometry_tile.cpp
    ${MBGL_ROOT}/src/mbgl/tile/geometry_tile.hpp
    ${MBGL_ROOT}/src/mbgl/tile/geometry_tile_data.cpp
    ${MBGL_ROOT}/src/mbgl/tile/geometry_tile_data.hpp
    ${MBGL_ROOT}/src/mbgl/tile/geometry_tile_worker.cpp
    ${MBGL_ROOT}/src/mbgl/tile/geometry_tile_worker.hpp
    ${MBGL_ROOT}/src/mbgl/tile/raster_dem_tile.cpp
    ${MBGL_ROOT}/src/mbgl/tile/raster_dem_tile.hpp
    ${MBGL_ROOT}/src/mbgl/tile/raster_dem_tile_worker.cpp
    ${MBGL_ROOT}/src/mbgl/tile/raster_dem_tile_worker.hpp
    ${MBGL_ROOT}/src/mbgl/tile/raster_tile.cpp
    ${MBGL_ROOT}/src/mbgl/tile/raster_tile.hpp
    ${MBGL_ROOT}/src/mbgl/tile/raster_tile_worker.cpp
    ${MBGL_ROOT}/src/mbgl/tile/raster_tile_worker.hpp
    ${MBGL_ROOT}/src/mbgl/tile/tile.cpp
    ${MBGL_ROOT}/src/mbgl/tile/tile.hpp
    ${MBGL_ROOT}/src/mbgl/tile/tile_cache.cpp
    ${MBGL_ROOT}/src/mbgl/tile/tile_cache.hpp
    ${MBGL_ROOT}/src/mbgl/tile/tile_id_hash.cpp
    ${MBGL_ROOT}/src/mbgl/tile/tile_id_io.cpp
    ${MBGL_ROOT}/src/mbgl/tile/tile_loader.hpp
    ${MBGL_ROOT}/src/mbgl/tile/tile_loader_impl.hpp
    ${MBGL_ROOT}/src/mbgl/tile/tile_observer.hpp
    ${MBGL_ROOT}/src/mbgl/tile/vector_tile.cpp
    ${MBGL_ROOT}/src/mbgl/tile/vector_tile.hpp
    ${MBGL_ROOT}/src/mbgl/tile/vector_tile_data.cpp
    ${MBGL_ROOT}/src/mbgl/tile/vector_tile_data.hpp
    ${MBGL_ROOT}/src/mbgl/util/chrono.cpp
    ${MBGL_ROOT}/src/mbgl/util/color.cpp
    ${MBGL_ROOT}/src/mbgl/util/constants.cpp
    ${MBGL_ROOT}/src/mbgl/util/convert.cpp
    ${MBGL_ROOT}/src/mbgl/util/dtoa.cpp
    ${MBGL_ROOT}/src/mbgl/util/dtoa.hpp
    ${MBGL_ROOT}/src/mbgl/util/event.cpp
    ${MBGL_ROOT}/src/mbgl/util/font_stack.cpp
    ${MBGL_ROOT}/src/mbgl/util/geo.cpp
    ${MBGL_ROOT}/src/mbgl/util/geojson_impl.cpp
    ${MBGL_ROOT}/src/mbgl/util/grid_index.cpp
    ${MBGL_ROOT}/src/mbgl/util/grid_index.hpp
    ${MBGL_ROOT}/src/mbgl/util/hash.hpp
    ${MBGL_ROOT}/src/mbgl/util/http_header.cpp
    ${MBGL_ROOT}/src/mbgl/util/http_header.hpp
    ${MBGL_ROOT}/src/mbgl/util/http_timeout.cpp
    ${MBGL_ROOT}/src/mbgl/util/http_timeout.hpp
    ${MBGL_ROOT}/src/mbgl/util/i18n.cpp
    ${MBGL_ROOT}/src/mbgl/util/i18n.hpp
    ${MBGL_ROOT}/src/mbgl/util/id.cpp
    ${MBGL_ROOT}/src/mbgl/util/id.hpp
    ${MBGL_ROOT}/src/mbgl/util/interpolate.cpp
    ${MBGL_ROOT}/src/mbgl/util/intersection_tests.cpp
    ${MBGL_ROOT}/src/mbgl/util/intersection_tests.hpp
    ${MBGL_ROOT}/src/mbgl/util/io.cpp
    ${MBGL_ROOT}/src/mbgl/util/io.hpp
    ${MBGL_ROOT}/src/mbgl/util/literal.hpp
    ${MBGL_ROOT}/src/mbgl/util/logging.cpp
    ${MBGL_ROOT}/src/mbgl/util/longest_common_subsequence.hpp
    ${MBGL_ROOT}/src/mbgl/util/mapbox.cpp
    ${MBGL_ROOT}/src/mbgl/util/mapbox.hpp
    ${MBGL_ROOT}/src/mbgl/util/mat2.cpp
    ${MBGL_ROOT}/src/mbgl/util/mat2.hpp
    ${MBGL_ROOT}/src/mbgl/util/mat3.cpp
    ${MBGL_ROOT}/src/mbgl/util/mat3.hpp
    ${MBGL_ROOT}/src/mbgl/util/mat4.cpp
    ${MBGL_ROOT}/src/mbgl/util/mat4.hpp
    ${MBGL_ROOT}/src/mbgl/util/math.hpp
    ${MBGL_ROOT}/src/mbgl/util/premultiply.cpp
    ${MBGL_ROOT}/src/mbgl/util/rapidjson.cpp
    ${MBGL_ROOT}/src/mbgl/util/rapidjson.hpp
    ${MBGL_ROOT}/src/mbgl/util/rect.hpp
    ${MBGL_ROOT}/src/mbgl/util/std.hpp
    ${MBGL_ROOT}/src/mbgl/util/stopwatch.cpp
    ${MBGL_ROOT}/src/mbgl/util/stopwatch.hpp
    ${MBGL_ROOT}/src/mbgl/util/string.cpp
    ${MBGL_ROOT}/src/mbgl/util/thread_local.hpp
    ${MBGL_ROOT}/src/mbgl/util/thread_pool.cpp
    ${MBGL_ROOT}/src/mbgl/util/thread_pool.hpp
    ${MBGL_ROOT}/src/mbgl/util/tile_coordinate.hpp
    ${MBGL_ROOT}/src/mbgl/util/tile_cover.cpp
    ${MBGL_ROOT}/src/mbgl/util/tile_cover.hpp
    ${MBGL_ROOT}/src/mbgl/util/tile_cover_impl.cpp
    ${MBGL_ROOT}/src/mbgl/util/tile_cover_impl.hpp
    ${MBGL_ROOT}/src/mbgl/util/tile_range.hpp
    ${MBGL_ROOT}/src/mbgl/util/tiny_sdf.cpp
    ${MBGL_ROOT}/src/mbgl/util/tiny_sdf.hpp
    ${MBGL_ROOT}/src/mbgl/util/token.hpp
    ${MBGL_ROOT}/src/mbgl/util/url.cpp
    ${MBGL_ROOT}/src/mbgl/util/url.hpp
    ${MBGL_ROOT}/src/mbgl/util/utf.hpp
    ${MBGL_ROOT}/src/mbgl/util/version.cpp
    ${MBGL_ROOT}/src/mbgl/util/version.hpp
    ${MBGL_ROOT}/src/mbgl/util/work_request.cpp
    ${MBGL_ROOT}/src/parsedate/parsedate.cpp
    ${MBGL_ROOT}/src/parsedate/parsedate.hpp
)

if(EXISTS ${MBGL_ROOT}/.git/HEAD)
    execute_process(
        COMMAND
            git
            rev-parse
            --short=8
            HEAD
        WORKING_DIRECTORY ${MBGL_ROOT}
        OUTPUT_VARIABLE MBGL_VERSION_REV
        OUTPUT_STRIP_TRAILING_WHITESPACE
    )
else()
    set(MBGL_VERSION_REV 00000000)
endif()

set_source_files_properties(
    ${MBGL_ROOT}/src/mbgl/util/version.cpp
    PROPERTIES
    COMPILE_DEFINITIONS
    MBGL_VERSION_REV="${MBGL_VERSION_REV}"
)

target_include_directories(
    mbgl-core
    PRIVATE ${MBGL_ROOT}/src
)

target_include_directories(
    mbgl-core
    PUBLIC ${MBGL_ROOT}/include
)

if(NOT TARGET mapbox-base)
    add_subdirectory(${PROJECT_SOURCE_DIR}/vendor/mapbox-base/mapbox)
    add_subdirectory(${PROJECT_SOURCE_DIR}/vendor/mapbox-base/extras)
endif(NOT TARGET mapbox-base)

include(${PROJECT_SOURCE_DIR}/vendor/boost.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/earcut.hpp.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/eternal.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/geojson-vt-cpp.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/polylabel.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/protozero.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/shelf-pack-cpp.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/unique_resource.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/vector-tile.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/wagyu.cmake)

target_link_libraries(
    mbgl-core
    PRIVATE
        Mapbox::Base::Extras::kdbush.hpp
        Mapbox::Base::supercluster.hpp
        mbgl-compiler-options
        mbgl-vendor-boost
        mbgl-vendor-earcut.hpp
        mbgl-vendor-eternal
        mbgl-vendor-geojson-vt-cpp
        mbgl-vendor-polylabel
        mbgl-vendor-protozero
        mbgl-vendor-shelf-pack-cpp
        mbgl-vendor-unique_resource
        mbgl-vendor-vector-tile
        mbgl-vendor-wagyu
    PUBLIC
        Mapbox::Base::Extras::expected-lite
        Mapbox::Base::Extras::rapidjson
        Mapbox::Base::geojson.hpp
        Mapbox::Base::geometry.hpp
        Mapbox::Base::optional
        Mapbox::Base::typewrapper
        Mapbox::Base::value
        Mapbox::Base::variant
        Mapbox::Base::weak
)

set_property(TARGET mbgl-core PROPERTY FOLDER Core)

add_library(
    Mapbox::Map ALIAS mbgl-core
)

if(MBGL_WITH_PLATFORM_EXTRAS)
    include(${MBGL_WITH_PLATFORM_EXTRAS})
endif()

if(MBGL_WITH_CORE_ONLY)
    return()
elseif(MBGL_WITH_QT)
    include(${PROJECT_SOURCE_DIR}/platform/qt/qt.cmake)
elseif(CMAKE_SYSTEM_NAME STREQUAL Android)
    include(${PROJECT_SOURCE_DIR}/platform/android/android.cmake)
elseif(CMAKE_SYSTEM_NAME STREQUAL iOS)
    include(${PROJECT_SOURCE_DIR}/platform/ios/ios.cmake)
elseif(CMAKE_SYSTEM_NAME STREQUAL Linux)
    include(${PROJECT_SOURCE_DIR}/platform/linux/linux.cmake)
elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
    include(${PROJECT_SOURCE_DIR}/platform/macos/macos.cmake)
else()
    message(FATAL_ERROR "Unsupported target platform: " ${CMAKE_SYSTEM_NAME})
endif()

add_subdirectory(${PROJECT_SOURCE_DIR}/test)
add_subdirectory(${PROJECT_SOURCE_DIR}/benchmark)
add_subdirectory(${PROJECT_SOURCE_DIR}/render-test)
